home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 November / PCWorld_2007-11_cd.bin / domácnost a kancelar / opencontacts / setup.exe / {app} / DataSet / Templates / defaultPhoneOnly.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2007-08-30  |  2.2 KB  |  76 lines

  1. ∩╗┐<?xml version="1.0" encoding="UTF-8"?>
  2. <!--Render phone fields only-->
  3. <xsl:stylesheet version="1.0"
  4. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  5.   <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" />
  6.  
  7.   <xsl:template match="/">
  8.     <html>
  9.       <head>
  10.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  11.       </head>
  12.  
  13.       <body>
  14.         <xsl:for-each select="OpenContacts/Contacts/Contact">
  15.  
  16.           <table border="0" width="100%" id="table2">
  17.             <tr>
  18.               <td width="80%">
  19.                 <font face="Times New Roman" size="3">
  20.                   <b>
  21.                     <xsl:value-of select="@Name"/>
  22.                   </b>
  23.                 </font>
  24.               </td>
  25.             </tr>
  26.           </table>
  27.  
  28.           <xsl:for-each select="Sections/Section">
  29.  
  30.  
  31.             <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
  32.               <xsl:for-each select="Fields/Field">
  33.                 <xsl:choose>
  34.  
  35.  
  36.                   <xsl:when test="@Action='phone'">
  37.                     <tr>
  38.                       <td width="15"></td>
  39.                       <td width="80" bgcolor="#C3D9FF">
  40.                         <b>
  41.                           <font face="Times New Roman" size="2">
  42.                             <xsl:value-of select="../../@Name"/>
  43.                           </font>
  44.                         </b>
  45.                       </td>
  46.  
  47.  
  48.                 <!--  Field Name   <td width="80" bgcolor="#C3D9FF">
  49.                         <font face="Times New Roman" size="2">
  50.                           <xsl:value-of select="@Name"/>:
  51.                         </font>
  52.                       </td>--> 
  53.                       <td bgcolor="#E0ECFF">
  54.                         <font size="3">
  55.  
  56.                           <xsl:value-of select="@Value"/>
  57.  
  58.  
  59.                         </font>
  60.                       </td>
  61.                     </tr>
  62.                   </xsl:when>
  63.  
  64.                 </xsl:choose>
  65.               </xsl:for-each>
  66.  
  67.             </table>
  68.  
  69.           </xsl:for-each>
  70.  
  71.         </xsl:for-each>
  72.       </body>
  73.     </html>
  74.   </xsl:template>
  75.  
  76. </xsl:stylesheet>